#include<cstdlib>
#include<time.h>

using namespace std;

static long getTime() {
	return long(time(0));
}

static int rand2Or4ByTime() {
	srand(getTime());
	return (rand() % 2) % 2 == 0 ? 2 : 4;
}

static int rand2Or4ByNum(int num) {
	srand(num);
	return (rand() % 2) % 2 == 0 ? 2 : 4;
}

static int rand0ToAnyByTime(int max) {
	srand(getTime());
	return rand() % max;
}

static int rand0ToAnyByNum(int max, int num) {
	srand(num);
	return rand() % max;
}
